import classNames from 'classnames'

export const DISPLAY_NAME_TAB_ITEM = 'TabItem'

export interface TabItemProps {
  /** Tab选项上面的文字 */
  label: string | React.ReactElement
  /** Tab选项是否被禁用 */
  disabled?: boolean
}

// 获取组件配置的class
export const getTabItemClassNames = (
  props: TabItemProps,
  extendClass?: () => Object
) => {
  return classNames('tab-item', extendClass && extendClass())
}
